1. Field of the Invention
The present invention relates to a technique for image processing, and more particularly to an apparatus and methods for overwriting image data at low cost and high speed.
2. Discussion of the Related Art
Overwriting of images is the process of overwriting an image with another image of a predetermined unit. It includes, for example, overwriting with non-transparent ink by PS(Post Script,xe2x80x9cPostScript Reference Manual, Second Editionxe2x80x9d Adobe Systems, Ascii), a type of PDL(Page Description Language). Axe2x80x9cpredetermined unitxe2x80x9d may be a single raster or a plotting object.
Although usual image processing, such as enlargement, reduction and spatial filtering(xe2x80x9clmage Analysis Handbookxe2x80x9d Tokyo University Press), can be performed in one direction from the left upper side of an image to the right bottom side, overwriting cannot be performed in one direction with respect to the space coordinates of an image.
In an overwriting process, the overwriting image may be input randomly with respect to the space coordinates of the output image. Therefore, if the process is performed in the input order, it cannot be performed in the order of the space coordinates on the output image side. FIGS. 13(a) and 13(b) show an example of overwriting, wherein 210 and 211 are plotting objects. FIG. 13(b) is the output result of overwriting 210 with 211. It can be understood from the drawings that a random scan needs to be performed on the output image, and that a page memory is necessary in an overwriting process.
Overwriting is performed by manipulating a data under process. When expressed as a data flow, it can be seen that a feedback loop appears during the process. Feedback loops cause overheads in the processing time that leads to controlling complications, and therefore are generally preferred to be shorter.
Smaller page memories are also preferred. With the high resolution of image data in recent high image quality printing apparatuses, reducing of memories remains a crucial problem despite the decrease in the unit price of memories. The following are examples of methods suggested hereto to reduce page memories.
The first method is disclosed by Japanese Laid-Open Patent Application No.5-31974. This method aims to reduce the required memory volume by applying image compression coding when storing overwritten image data to a page memory.
FIG. 14 is a block diagram illustrating this method. The block diagram is modified to best illustrate this method in relation to the present invention, within limits not prejudiciary to the disclosure.
As shown in FIG. 14, an input image data 110 is input to an image input unit 10. An overwriting unit 20 overwrites the input image data 110 over a stored image data 140 with predetermined small areas as processing units, and outputs the result to a small area buffer 30 as a processed image data 120. The small area buffer 30 outputs the processed image data 120 to an output switching unit 40 as a processed image data 130. The output switching unit 40 outputs the processed image data 130 to the coder 50 as an output image data 150 if the overwriting is complete, and if not, to the overwriting unit 20 as the stored image data 140. The coder 50 performs a predetermined compression coding upon the output image data 150 and outputs the result to a compressed page memory 60 as a code data 160. The compressed page memory 60 stores the code data 160 until code data correspondent to all of the small areas are complete, and then outputs them to a decoder 70 as a code data 170. The decoder 70 transforms such decoding that is the reverse transform of the coding performed by the coder, and outputs the result as a decoded image data 180 to an image output unit 80. The image output unit 80 outputs the decoded image data 180 to an external device.
FIG. 15 is a flow chart showing the operations of this method. In this method, image data are divided into partial image data. Each partial image data is referred to as a small area. The image data currently under processing is called a target image data and the small area currently under processing is similarly called a target small area.
As shown in FIG. 15, the input image data 110 is input in the image data input unit 10 in step 10. In step 20, the input image data 110 is handled in small area units and the process proceeds to step 30 if the area currently being input is correspondent to the target small area, or to step 50 if it is not. In step 30, the target small area stored in the target small area 30 is read out as the stored image data 140 through the output switching unit. In step 40, the overwriting unit 20 overwrites the input image data 110 over the stored image data 140. In step 50, the small area is skipped because the input image data 110 does not correspond to the target small area. In step 60, it is determined if processing is complete for all of the small areas of the target image data. The process proceeds to step 70 if all are complete, and returns to step 20 otherwise.
In step 70, it is determined if processing is complete for all of the input image data. If all are complete, the process proceeds to step 80, and to step 90 if not. In step 80, the coder 50 codes the output image data 150 the overwriting of which is complete, and stores the coded data in the compressed page memory 60. In step 90, the next image data becomes the target image data. In step 100, it is determined if overwriting is complete for all of the small areas. The process proceeds to step 110 if it is, and to step 120 if not. In step 110, the decoder 70 decodes the coded data 170 and outputs the result to the image output unit 80. In step 120, the next is small area becomes the target small area, and the first image data of the input image data 110 becomes the target image data.
The coder 50 and the decoder 70 performs such image data compression coding that renders the resulting data quantity of the code data 160 smaller than that of the processed image data 150. In the disclosure of this method, compression using DCT(Discrete Cosine Transform) is discussed as an example.
According to this method, the overwritten image data is complete is stored in a coded state. Therefore, reduction of required memory is possible since storage capacity enough to store the code quantity of a page worth of image data is only needed. The memory aimed to store a page worth of image data in a compressed state is referred to as a compressed page memory hereinafter.
This method performs the coding process in the pixel order of the output image. Therefore, it is necessary to repeatedly input the input image in accordance with the output image. The resulting increase in the processing time is a problem with this method.
The second method explained hereafter has been suggested in order to solve this problem and is disclosed by Japanese Laid-Open Patent No. 5-37789. According to this method, image compression coding is performed to image data under an overwriting process and the result is stored in a page memory. This way, the necessary memory capacity is reduced and image data needs to be input only once as well.
FIG. 16 is a block diagram illustrating this method. The parts similar to those of the first method have the same numberings and perform the same functions as in FIG. 4, and therefore are not repeatedly discussed in detail. 141 is a stored image data and 181 is a decoded image data.
FIG. 17 is a flow chart showing the operations of this method. Here again, the operations similar to those of the first method have the same numberings and perform the same functions, and therefore are not repeatedly discussed in detail.
As shown in FIG. 17, a decoder 70 decodes a code data 170 of a target small area stored in a compressed page memory 60 in step 31, and the resulting data is stored in an overwriting unit 20 as a stored image data 141 through an output switching unit 40. In step 81, a coder 50 codes a processed image data 130 regardless of whether or not overwriting of the target small area is complete.
As in the first method, this method aims to reduce the required memory using a compressed page memory. In addition, this method eliminates the need to repeatedly input image data by storing in the compressed page memory small area image data under processing in addition to those the overwriting of which is complete.
However, since this method codes all of the small areas of an image data including those under processing, the heavy processing load of the coding process incurs an overhead in the processing time. Furthermore, if image data is coded by lossy coding, the same image data is repeatedly coded and causes an accumulation of errors called a generation noise, which results in a deterioration of image quality.
FIGS. 19(a) and 19(b) respectively show examples of an overwriting process sequence in the first and second methods of the prior art apparatuses when overwriting input image 1 of FIG. 18(a) with input image 2 of FIG. 18(b).
As shown in FIG. 19(a), in the first method, in order to process small area 222, small areas 220, 221 and 223 are skipped and are not read. Similar skips occur when processing other small areas, resulting in a large image input overhead. As shown in FIG. 19(b), in the second method, it is necessary to decode small area 220 before overwriting it with small area 223. This corresponds to the feedback loop of the stored image data 141 in FIG. 16, and is prolonged because of the decoding process, thereby increasing the process time. Also, as mentioned earlier, the problem of image quality deterioration remains if lossy coding is performed.
The present invention has been made in view of the above circumstances and with an aspect to provide an image data processing technique that overwrites image data at low cost and high speed.
An image processing apparatus according to the first aspect of the present invention includes an overwriting unit that overwrites a partial image data of an image data, a partial image data storing unit that stores the output partial image data from the overwriting unit, and a process prediction unit that predicts whether further overwriting is performed upon the partial image data.
The image processing apparatus further includes a completion judgment unit that sends the partial image data to a coding unit if the overwriting processing is complete, and to a data storing unit otherwise, the coding unit performing a predetermined image data compression coding upon the partial image data, a data storing unit that stores either the partial image data output from the completion judgment unit or the code data output from the coding unit and an output switching unit that sends the data stored in the data storing unit to the overwriting processing unit if it is a partial image data, and to a decoding unit if it is a code data, the decoding unit decoding the code data by an inverse process of the coding.
With this construction, an overhead incurred during the inputting of images can be reduced since the input image data do not need to be repeatedly input. Furthermore, the process load of the feedback loop of overwriting process can also be reduced because partial data that are predicted as having a further overwriting process is stored in the data storing unit without being coded. The partial data the overwriting of which is predicted as being complete is coded and stored in the data storing unit, and therefore the memory volume of the data storing unit can be reduced, thus reducing the cost.
The prediction of the presence of further overwriting may be accurate or inaccurate. When the prediction is inaccurate and a wrong prediction is made, a penalty is accordingly generated. However, the effectiveness of the image processing increases as a whole if the prediction is accurate. If there is a chance that overwriting of a partial image is predicted as being complete when it is not, such construction that further performs a more accurate prediction when it is predicted that overwriting is complete may be included. The process load increases to an extent in this case, but penalties caused by inaccurate predictions can be avoided.
In another embodiment of the present invention, an image processing apparatus includes an overwriting unit that overwrites a partial image data of an image data, a partial image data storing unit that stores the output partial image data from the overwriting unit, a process prediction unit that predicts whether further overwriting is performed upon the partial image data and a completion judgment unit that sends the partial image data to a coding unit if the overwriting processing is complete, and to a data storing unit otherwise, the coding unit performing a predetermined image data compression coding upon the partial image data.
The image processing apparatus further includes a data storing unit that stores either the partial image data output from the completion judgment unit or the code data output from the coding unit, an output switching unit that sends the data stored in the data storing unit to the overwriting processing unit if it is a partial image data, and to a code data converting unit if it is a code data, the code data converting unit converting the code data so as to further reduce its code quantity and a code data output unit that outputs the resulting code data from the code data converting unit.
With this construction as well, both an overhead incurred during the inputting of images and the process load of the feedback loop of overwriting process can be reduced, and the memory volume of the data storing unit can be reduced.
In yet another embodiment of the present invention, an image processing apparatus includes an overwriting unit that overwrites a partial image data of an image data, a partial image data storing unit that stores the output partial image data from the overwriting unit and a first data storing unit that stores the partial image data.
The image processing apparatus further includes a coding unit that performs a predetermined image data compression coding upon the partial image, a second data storing unit that stores the code data, and a decoding unit that decodes the code data by inverse process of the coding.
With the above construction, the throughput of image processing is improved since partial data can be coded regardless of whether overwriting is complete or not. If further overwriting must be performed on a partial data, non-coded image data stored in the first data storing unit is used. In this way, unnecessary coding and decoding processes can be eliminated from the feedback loop of the overwriting process, and process load is reduced as a result.
In another embodiment of the present invention, an image processing apparatus includes an overwriting unit that overwrites a partial image data of an image data, a partial image data storing unit that stores the output partial image data from the overwriting unit, a first data storing unit that stores the partial image data and a coding unit that performs a predetermined image data compression coding upon the partial image.
The image processing apparatus further includes a second data storing unit that stores the code data, a code data converting unit that converts the code data so as to further reduce its code quantity and a code data output unit that outputs the code data.
With this construction as well, the throughput of image processing is improved, and unnecessary coding and decoding processes can be eliminated from the feedback loop of the overwriting process.
An aspect of the present invention is that the partial image is coded as an individual image data, and a part of the partial image data is stored without being coded. The part of the partial image data that is stored without being coded is a direct current component of a head block and an end block of the partial image data.
Another aspect of the present invention is that the partial image is coded based upon a code data order as an individual image data that consists of a plurality of independent code data. The plurality of independent code data are independent in block line units.
Yet another aspect of the present invention is that the image processing apparatus performs a code data conversion by connecting the code data of each partial data to reduce the code quantity. The code data of each partial data is connected by determining and coding the difference of direct current component values of adjacent code data. A control signal that initializes the coding or the decoding is added between the code data of each partial data.
An another aspect of the present invention is that the process prediction process inspects which input image data overwrites which predetermined partial data. The process prediction is performed prior to the overwriting process. The process prediction is performed in parallel with the overwriting process of an image data the process prediction of which was performed immediately before.